package com.gooapple.notepad.model;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.Properties;

import android.os.Bundle;
import android.text.method.ReplacementTransformationMethod;
import android.widget.TextView;


public class BookInfo {
    //去掉方框
    private class MyTransformationMethod extends ReplacementTransformationMethod{
        @Override
        protected char[] getOriginal() {
            char[] original={'\r','2'};
            return original;
        }
        @Override
        protected char[] getReplacement() {      
            char[] replacement={' ','3'};
            return replacement;
        }
      
    } 
    public StringBuffer  readText(){
    	File file = new File("data/data/com.cienet.li.net/fenye.txt");
    	   StringBuffer str = new StringBuffer();
    	   char[] bts = new char[1];
    	   String temp;
    	  try {
    	   
    	       FileInputStream fis = new FileInputStream(file);
    	       Properties properties=new Properties();
    	       properties.getProperty("");
    	       InputStreamReader isr = new InputStreamReader(fis, "Unicode");
    	       String encdingString=isr.getEncoding();
    	       BufferedReader br = new BufferedReader(isr);
    	       while (br.read(bts) != -1) {
    	            temp = new String(bts);
    	            str.append(temp);
    	       }
    	  } catch (Exception e) {
    	   e.printStackTrace();
    	  }
    	  return str;
    }
}
